<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Letter to your boss</title>
</head>
<body>

<h1>Message service</h1>

<form action="boss.php" method="POST">
Your employee ID: #<input type="text" name="employee" size="6" maxlength="6">
<p>
Please write your letter to your boss here:<p>
<textarea name="message" cols=80 rows=20></textarea>
<p>
<input type="hidden" name="log">
<input type="submit" value="Send">
</form>

<script>
	function myLoggerFunction(event) {
		alert("hejsa");
	}


 
	function myAddEventListener(myNode, eventType, myHandlerFunc) {
		if (myNode.addEventListener)
			myNode.addEventListener(eventType, myHandlerFunc, false);
		else
			myNode.attachEvent("on" + eventType, function(event) {
				myHandlerFunc.call(myNode, event);
			});
	}

	var myNode = document.getElementsByName("message");
 
	myAddEventListener(myNode, "keypress", myLoggerFunction());
</script>

</body>
</html>